package first.liter;

/**
 * Abstract Factory that creates abstract Factory for Languages of Books and Journals
 * 
 * @author Kozlov Kirill
 * @version Thu Oct 21,2010
 */
public abstract class AbstractLanguage 
{
	/**
	 * Enumeration of Languages: Russian, Ukrainian, English 
	 *
	 */
	enum Language { RUSSIAN, UKRAINIAN, ENGLISH };
	
	public static BaseLanguage getLanguage(String data)
	{

		Language my = Language.valueOf(data.toUpperCase());
		switch (my)
		{		
		case RUSSIAN: return new RussianLanguage();
		case UKRAINIAN: return new UkrainianLanguage();
		case ENGLISH: return new EnglishLanguage();
		default:{}// throw new EnumConstantNotPresentException(Signs.class, sign.name())
		}
		return null;
	}

}
